<?php
global $references;
$references = array(
    "contentManager.requestDispatcher" => array(
        "class" => "Pageley_Controller_Dispatcher_Http",
        "properties" => array(
            "application" => "#{application}",
            "contextPath" => "content-manager",
            "controllers" => array(
                "Query" => "#{contentManager.controller.query}",
                "StartAdd" => "#{contentManager.controller.startAdd}",
                "Find" => "#{contentManager.controller.find}",
                "StartDelete" => "#{contentManager.controller.startDelete}",
				"Delete" => "#{contentManager.controller.delete}",
                "Save" => "#{contentManager.controller.save}",
                "Include" => "#{contentManager.controller.include}"
            )
        )
    ),
    
    "contentManager.controller.save" => array(
        "class" => "Pageley_Controller_Dynamic",
        "constructor" => array(
            "views" => array(
                "success" => "forward",
                "failure" => "show-entity"
            ),
            "commandClassName" => "Pageley_Basic_Command_Save",
            "unitOfWork" => "#{unitOfWork}",
            "parameters" => array(
                "prefix" => "entity."
            )
        )
    ),
    
    "contentManager.controller.query" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "list-entities"
            ),
            "commandClassName" => "Pageley_Basic_Command_Query",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),
    
    "contentManager.controller.startAdd" => array(
        "class" => "Pageley_Controller_Basic",
        "constructor" => array(
            "views" => array(
                "success" => "show-entity"
            )
        )
    ),
    
    "contentManager.controller.startDelete" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "delete",
                "failure" => "delete-dependencies"
            ),
            "commandClassName" => "Pageley_ContentManager_Command_ValidateDelete",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),
    
    "contentManager.controller.find" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "show-entity"
            ),
            "commandClassName" => "Pageley_Basic_Command_Get",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),
    
    "contentManager.controller.delete" => array(
        "class" => "Pageley_Controller_TransactionalForm",
        "constructor" => array(
            "views" => array(
                "success" => "forward"
            ),
            "commandClassName" => "Pageley_Basic_Command_Delete",
            "unitOfWork" => "#{unitOfWork}"
        )
    ),

    "contentManager.controller.include" => array(
        "class" => "Pageley_Controller_Basic",
        "constructor" => array(
            "views" => array(
                "success" => ""
            )
        )
    )
);